package com.timoon.sample.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.timoon.sample.dao.InfoMediumDAO;
import com.timoon.sample.dao.model.InfoMedium;
import com.timoon.sample.dao.model.InfoMediumExample;
import com.timoon.sample.dao.model.InfoSort;
import com.timoon.webcomponent.utility.helpinfo.HelpInfoService;
import com.timoon.webcomponent.utility.info.ContactUsService;

/**
 *<p></p>
 *<p></p>
 *<p>Copyright:Copyright(c)2013</p>
 *<p>Company:timoon</p>
 *@author 付乐天
 *@version 1.0 */

@Service(value="sample.InfoMedium")
public class InfoMediumServiceImpl implements ContactUsService,HelpInfoService {

	@Resource
	private InfoMediumDAO infoMediumDAOImpl;


	@Override
	public InfoMedium getInfoMediumById(Integer Id) {
		// TODO Auto-generated method stub
		return this.infoMediumDAOImpl.selectByPrimaryKey(Id);
	}


	@Override
	public List<InfoMedium> getInfoMediumByType(final Integer type) {
		// TODO Auto-generated method stub
		return this.infoMediumDAOImpl.selectByExampleWithBLOBs(new InfoMediumExample(){{
			this.createCriteria().andTypeEqualTo(type);
		}});
	}

}
